\section{src/process/elf\-Process/header\-Process.c \-File \-Reference}
\label{header_process_8c}\index{src/process/elf\-Process/header\-Process.\-c@{src/process/elf\-Process/header\-Process.\-c}}
{\ttfamily \#include \char`\"{}header\-Process.\-h\char`\"{}}\*
{\ttfamily \#include $<$config.\-h$>$}\*
{\ttfamily \#include $<$stdio.\-h$>$}\*
{\ttfamily \#include $<$stdlib.\-h$>$}\*
{\ttfamily \#include $<$sys/types.\-h$>$}\*
{\ttfamily \#include $<$unistd.\-h$>$}\*
{\ttfamily \#include \char`\"{}process/decode/decode.\-h\char`\"{}}\*
{\ttfamily \#include $<$my\-Lib.\-h$>$}\*
\-Include dependency graph for header\-Process.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{header_process_8c__incl}
\end{center}
\end{figure}
\subsection*{\-Data \-Structures}
\begin{DoxyCompactItemize}
\item 
struct {\bf s\-\_\-header\-Process}
\begin{DoxyCompactList}\small\item\em structure containing the name and function of each section to disassemble \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Defines}
\begin{DoxyCompactItemize}
\item 
\#define {\bf \-H\-E\-A\-D\-E\-R\-\_\-\-N\-A\-M\-E\-\_\-\-T\-E\-X\-T}~\char`\"{}.text\char`\"{}
\item 
\#define {\bf \-R\-A\-W\-\_\-\-P\-R\-I\-N\-T\-\_\-\-L\-E\-N\-G\-T\-H}~16
\begin{DoxyCompactList}\small\item\em \-Raw print length. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Functions}
\begin{DoxyCompactItemize}
\item 
char {\bf process\-Text} (\-G\-Elf\-\_\-\-Shdr shdr, \-Elf $\ast$e, size\-\_\-t shstrndx, int {\bf fd})
\begin{DoxyCompactList}\small\item\em \-Function that processes the text contained within a section of the file. \end{DoxyCompactList}\item 
char {\bf process\-Header} (\-G\-Elf\-\_\-\-Shdr shdr, \-Elf $\ast$e, size\-\_\-t shstrndx, int {\bf fd})
\item 
unsigned char {\bf read\-Bin\-Header\-Byte} (\-G\-Elf\-\_\-\-Shdr shdr, int {\bf fd}, int offset)
\begin{DoxyCompactList}\small\item\em \-Reads the binary contents of a byte of section established. \end{DoxyCompactList}\item 
char {\bf read\-Bin\-Header\-Data} (\-G\-Elf\-\_\-\-Shdr shdr, int {\bf fd}, int offset, char $\ast$buf, char {\bf size})
\item 
char {\bf raw\-Print\-Content} (int {\bf fd}, \-G\-Elf\-\_\-\-Shdr shdr)
\begin{DoxyCompactList}\small\item\em \-Sets the hex output format to the read\-Bin\-Header\-Byte function. \end{DoxyCompactList}\item 
void {\bf print\-Machine\-Pretty} ({\bf \-M\-A\-C\-H\-I\-N\-E\-\_\-\-I\-N\-S\-T\-R\-U\-C\-T\-I\-O\-N} $\ast$inst)
\begin{DoxyCompactList}\small\item\em \-Sets output format to a machine instruction. \end{DoxyCompactList}\item 
void {\bf print\-Machine} ({\bf \-M\-A\-C\-H\-I\-N\-E\-\_\-\-I\-N\-S\-T\-R\-U\-C\-T\-I\-O\-N} $\ast$inst)
\begin{DoxyCompactList}\small\item\em \-Displays the hexadecimal number for the instruction processed. \end{DoxyCompactList}\item 
void {\bf print\-Asm} ({\bf \-M\-A\-C\-H\-I\-N\-E\-\_\-\-I\-N\-S\-T\-R\-U\-C\-T\-I\-O\-N} $\ast$inst)
\begin{DoxyCompactList}\small\item\em \-Displays the assembler instruction corresponding to the instruction analyzed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Variables}
\begin{DoxyCompactItemize}
\item 
{\bf s\-\_\-header\-Process} {\bf header\-Functions} [$\,$]
\begin{DoxyCompactList}\small\item\em \-Array of header functions. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{\-Define \-Documentation}
\index{header\-Process.\-c@{header\-Process.\-c}!\-H\-E\-A\-D\-E\-R\-\_\-\-N\-A\-M\-E\-\_\-\-T\-E\-X\-T@{\-H\-E\-A\-D\-E\-R\-\_\-\-N\-A\-M\-E\-\_\-\-T\-E\-X\-T}}
\index{\-H\-E\-A\-D\-E\-R\-\_\-\-N\-A\-M\-E\-\_\-\-T\-E\-X\-T@{\-H\-E\-A\-D\-E\-R\-\_\-\-N\-A\-M\-E\-\_\-\-T\-E\-X\-T}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{\-H\-E\-A\-D\-E\-R\-\_\-\-N\-A\-M\-E\-\_\-\-T\-E\-X\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define {\bf \-H\-E\-A\-D\-E\-R\-\_\-\-N\-A\-M\-E\-\_\-\-T\-E\-X\-T}~\char`\"{}.text\char`\"{}}\label{header_process_8c_a1f0e224fa59a7f99fdef842b0efb7728}


\-Definition at line 19 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!\-R\-A\-W\-\_\-\-P\-R\-I\-N\-T\-\_\-\-L\-E\-N\-G\-T\-H@{\-R\-A\-W\-\_\-\-P\-R\-I\-N\-T\-\_\-\-L\-E\-N\-G\-T\-H}}
\index{\-R\-A\-W\-\_\-\-P\-R\-I\-N\-T\-\_\-\-L\-E\-N\-G\-T\-H@{\-R\-A\-W\-\_\-\-P\-R\-I\-N\-T\-\_\-\-L\-E\-N\-G\-T\-H}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{\-R\-A\-W\-\_\-\-P\-R\-I\-N\-T\-\_\-\-L\-E\-N\-G\-T\-H}]{\setlength{\rightskip}{0pt plus 5cm}\#define {\bf \-R\-A\-W\-\_\-\-P\-R\-I\-N\-T\-\_\-\-L\-E\-N\-G\-T\-H}~16}\label{header_process_8c_a3c0994146b1bef939dee3fe64f6dce28}


\-Raw print length. 



\-Definition at line 69 of file header\-Process.\-c.



\subsection{\-Function \-Documentation}
\index{header\-Process.\-c@{header\-Process.\-c}!print\-Asm@{print\-Asm}}
\index{print\-Asm@{print\-Asm}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{print\-Asm}]{\setlength{\rightskip}{0pt plus 5cm}{\bf print\-Asm} (
\begin{DoxyParamCaption}
\item[{{\bf \-M\-A\-C\-H\-I\-N\-E\-\_\-\-I\-N\-S\-T\-R\-U\-C\-T\-I\-O\-N} $\ast$}]{inst}
\end{DoxyParamCaption}
)}\label{header_process_8c_a3be427673484ac076b7513861e5dc3bc}


\-Displays the assembler instruction corresponding to the instruction analyzed. 


\begin{DoxyParams}{\-Parameters}
{\em inst} & \-Machine instruction to be set \\
\hline
\end{DoxyParams}


\-Definition at line 243 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!print\-Machine@{print\-Machine}}
\index{print\-Machine@{print\-Machine}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{print\-Machine}]{\setlength{\rightskip}{0pt plus 5cm}{\bf print\-Machine} (
\begin{DoxyParamCaption}
\item[{{\bf \-M\-A\-C\-H\-I\-N\-E\-\_\-\-I\-N\-S\-T\-R\-U\-C\-T\-I\-O\-N} $\ast$}]{inst}
\end{DoxyParamCaption}
)}\label{header_process_8c_acc4eb4e80b0bee5ee1867ffa7b5069a1}


\-Displays the hexadecimal number for the instruction processed. 


\begin{DoxyParams}{\-Parameters}
{\em inst} & \-Machine instruction to be set \\
\hline
\end{DoxyParams}


\-Definition at line 188 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!print\-Machine\-Pretty@{print\-Machine\-Pretty}}
\index{print\-Machine\-Pretty@{print\-Machine\-Pretty}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{print\-Machine\-Pretty}]{\setlength{\rightskip}{0pt plus 5cm}{\bf print\-Machine\-Pretty} (
\begin{DoxyParamCaption}
\item[{{\bf \-M\-A\-C\-H\-I\-N\-E\-\_\-\-I\-N\-S\-T\-R\-U\-C\-T\-I\-O\-N} $\ast$}]{inst}
\end{DoxyParamCaption}
)}\label{header_process_8c_a3cf7c204025d9fb0a86031ffdd481992}


\-Sets output format to a machine instruction. 


\begin{DoxyParams}{\-Parameters}
{\em inst} & \-Machine \-Instruction to be set \\
\hline
\end{DoxyParams}


\-Definition at line 127 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!process\-Header@{process\-Header}}
\index{process\-Header@{process\-Header}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{process\-Header}]{\setlength{\rightskip}{0pt plus 5cm}{\bf process\-Header} (
\begin{DoxyParamCaption}
\item[{\-G\-Elf\-\_\-\-Shdr}]{shdr, }
\item[{\-Elf $\ast$}]{e, }
\item[{size\-\_\-t}]{shstrndx, }
\item[{int}]{fd}
\end{DoxyParamCaption}
)}\label{header_process_8c_a5de22d81fbbb97dc663c2b87c27a6f48}

\begin{DoxyParams}{\-Parameters}
{\em shdr} & \-E\-L\-F object containing the information for each section of the file \\
\hline
{\em e} & \-Elf object containing the information of the input file \\
\hline
{\em shstrndx} & \-Size of \-E\-L\-F section \\
\hline
{\em fd} & \-Pointer to the input file \\
\hline
\end{DoxyParams}


\-Definition at line 44 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!process\-Text@{process\-Text}}
\index{process\-Text@{process\-Text}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{process\-Text}]{\setlength{\rightskip}{0pt plus 5cm}char {\bf process\-Text} (
\begin{DoxyParamCaption}
\item[{\-G\-Elf\-\_\-\-Shdr}]{shdr, }
\item[{\-Elf $\ast$}]{e, }
\item[{size\-\_\-t}]{shstrndx, }
\item[{int}]{fd}
\end{DoxyParamCaption}
)}\label{header_process_8c_a9832a2fd05088ded2ec732fa0656dfca}


\-Function that processes the text contained within a section of the file. 


\begin{DoxyParams}{\-Parameters}
{\em shdr} & \-E\-L\-F object containing the information of a specific section of the input file \\
\hline
{\em e} & \-Elf object containing the information of the input file \\
\hline
{\em shstrndx} & \-Size of \-E\-L\-F section \\
\hline
{\em fd} & \-Pointer to the input file \\
\hline
\end{DoxyParams}


\-Definition at line 293 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!raw\-Print\-Content@{raw\-Print\-Content}}
\index{raw\-Print\-Content@{raw\-Print\-Content}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{raw\-Print\-Content}]{\setlength{\rightskip}{0pt plus 5cm}{\bf raw\-Print\-Content} (
\begin{DoxyParamCaption}
\item[{int}]{fd, }
\item[{\-G\-Elf\-\_\-\-Shdr}]{shdr}
\end{DoxyParamCaption}
)}\label{header_process_8c_afaf18ccf41a8fab748ba6cb0adb5c319}


\-Sets the hex output format to the read\-Bin\-Header\-Byte function. 


\begin{DoxyParams}{\-Parameters}
{\em shdr} & \-E\-L\-F object containing the information of a specific section of the input file \\
\hline
{\em fd} & \-Pointer to the input file \\
\hline
\end{DoxyParams}


\-Definition at line 102 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!read\-Bin\-Header\-Byte@{read\-Bin\-Header\-Byte}}
\index{read\-Bin\-Header\-Byte@{read\-Bin\-Header\-Byte}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{read\-Bin\-Header\-Byte}]{\setlength{\rightskip}{0pt plus 5cm}{\bf read\-Bin\-Header\-Byte} (
\begin{DoxyParamCaption}
\item[{\-G\-Elf\-\_\-\-Shdr}]{shdr, }
\item[{int}]{fd, }
\item[{int}]{offset}
\end{DoxyParamCaption}
)}\label{header_process_8c_ad24288bd8f64a0089255ac61b93c4ecb}


\-Reads the binary contents of a byte of section established. 


\begin{DoxyParams}{\-Parameters}
{\em shdr} & \-E\-L\-F object containing the information of a specific section of the input file \\
\hline
{\em fd} & \-Pointer to the input file \\
\hline
{\em offset} & \-Establishes position where you start reading\\
\hline
{\em shdr} & \-E\-L\-F object containing the information of a specific section of the input file \\
\hline
{\em fd} & \-Pointer to the input file \\
\hline
{\em offset} & \-Establishes position where you start reading \\
\hline
{\em buf} & buffer containing the portion of the file that has been read \\
\hline
{\em size} & \-Portion size to be read \\
\hline
\end{DoxyParams}


\-Definition at line 76 of file header\-Process.\-c.

\index{header\-Process.\-c@{header\-Process.\-c}!read\-Bin\-Header\-Data@{read\-Bin\-Header\-Data}}
\index{read\-Bin\-Header\-Data@{read\-Bin\-Header\-Data}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{read\-Bin\-Header\-Data}]{\setlength{\rightskip}{0pt plus 5cm}char {\bf read\-Bin\-Header\-Data} (
\begin{DoxyParamCaption}
\item[{\-G\-Elf\-\_\-\-Shdr}]{shdr, }
\item[{int}]{fd, }
\item[{int}]{offset, }
\item[{char $\ast$}]{buf, }
\item[{char}]{size}
\end{DoxyParamCaption}
)}\label{header_process_8c_a8e4ad65b0ee0fe343882d85d093b7759}


\-Definition at line 91 of file header\-Process.\-c.



\subsection{\-Variable \-Documentation}
\index{header\-Process.\-c@{header\-Process.\-c}!header\-Functions@{header\-Functions}}
\index{header\-Functions@{header\-Functions}!headerProcess.c@{header\-Process.\-c}}
\subsubsection[{header\-Functions}]{\setlength{\rightskip}{0pt plus 5cm}{\bf s\-\_\-header\-Process} {\bf header\-Functions}[$\,$]}\label{header_process_8c_aa3d3410182a503bc7302d19f7c6c3119}
{\bfseries \-Initial value\-:}
\begin{DoxyCode}

{
{ HEADER_NAME_TEXT, processText },
{ 0, 0 } }
\end{DoxyCode}


\-Array of header functions. 



\-Definition at line 32 of file header\-Process.\-c.

